
public class ID_EXE {
	int RegWE;
	int DestReg;
	int AccMem;
	int MemData;
	int MemWE;
	int AddMem;
	int Opcode;
	int Operand1;
	int Operand2;
	
	int rs;
	int rsdep;
	int rt;
	int rtdep;
	
	int keep;
	int clear;
	
	int swRegSrc;
	
	private int PC;
	
	void init(){
		keep=0;
		clear=0;
		PC=-4;
	}
	void clear(){
		RegWE=0;
		DestReg=0;
		AccMem=0;
		MemData=0;
		MemWE=0;
		AddMem=0;
		Opcode=0;
		Operand1=0;
		Operand2=0;
		
		rs=0;
		rsdep=0;
		rt=0;
		rtdep=0;
		swRegSrc=0;
	}
	
	void set_rs(int regwe){
		if(keep==0)
			rs=regwe;
	}
	int get_rs(){
		return rs;
	}
	void set_rsdep(int regwe){
		if(keep==0)
			rsdep=regwe;
	}
	int get_rsdep(){
		return rsdep;
	}
	void set_rt(int regwe){
		if(keep==0)
			rt=regwe;
	}
	int get_rt(){
		return rt;
	}
	void set_rtdep(int regwe){
		if(keep==0)
			rtdep=regwe;
	}
	int get_rtdep(){
		return rtdep;
	}
	void set_RegWE(int regwe){
		if(keep==0)
			RegWE=regwe;
	}
	int get_RegWe(){
		return RegWE;
	}
	void set_DestReg(int destreg){
		if(keep==0)
			DestReg=destreg;
	}
	int get_DestReg(){
		return DestReg;
	}
	void set_AccMem(int regwe){
		if(keep==0)
			AccMem=regwe;
	}
	int get_AccMem(){
		return AccMem;
	}
	void set_MemData(int regwe){
		if(keep==0)
			MemData=regwe;
	}
	int get_MemData(){
		return MemData;
	}
	void set_MemWE(int regwe){
		if(keep==0)	
			MemWE=regwe;
	}
	int get_MemWE(){
		return MemWE;
	}
	void set_AddMem(int regwe){
		if(keep==0)
			AddMem=regwe;
	}
	int get_AddMem(){
		return AddMem;
	}
	void set_Opcode(int regwe){
		if(keep==0)
			Opcode=regwe;
	}
	int get_Opcode(){
		return Opcode;
	}
	void set_Operand1(int regwe){
		if(keep==0)
			Operand1=regwe;
	}
	int get_Operand1(){
		return Operand1;
	}
	void set_Operand2(int regwe){
		if(keep==0)
			Operand2=regwe;
	}
	int get_Operand2(){
		return Operand2;
	}
	void set_swRegSrc(int regwe){
		if(keep==0)
			swRegSrc=regwe;
	}
	int get_swRegSrc(){
		return swRegSrc;
	}
	
	
	void setPC(int pc){
		if(pc==-1)
			this.clear();
		this.PC=pc;
	}
	
	int getPC(){
		return this.PC;
	}
	
}
